package com.mc.service.vo;
import java.math.BigDecimal;
import java.util.Date;

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.mc.service.vo.Order;
import com.mc.service.vo.OrderAddress;

import java.util.ArrayList;
import java.util.List;

/***
 * @ClassName TestJson
 * @Description todo
 * @Author CC
 * @Date: 2019/4/9 20:23
 * @Version 1.0
 */
public class TestJson {
    public static void main(String[] args) {
        OrderVo orderVo=new OrderVo();


        Order order=new Order();
        order.setOrderId(10086L);
        order.setOrderNo(10086l);
        order.setOrderStatus(3);
        order.setOrderTime(new Date());

        OrderAddress orderAddress = new OrderAddress();
        orderAddress.setAddressId(10087L);
        orderAddress.setOrderNo(10086l);
        orderAddress.setSender("曼珠沙华");
        orderAddress.setSenderAddress("陕西省西安市");
        orderAddress.setReceiver("王晨");
        orderAddress.setReceiverAddress("陕西省延安市");
        orderAddress.setOrderTime(new Date());

        List<OrderFee> feeList=new ArrayList<>();
        OrderFee orderFee1 = new OrderFee();
        orderFee1.setFeeId(10088l);
        orderFee1.setOrderNo(10086l);
        orderFee1.setFeeCode("CT02");
        orderFee1.setIsDelete(0);
        orderFee1.setInFee(new BigDecimal("0"));
        orderFee1.setOutFee(new BigDecimal("0"));

        OrderFee orderFee2 = new OrderFee();
        orderFee2.setFeeId(10088l);
        orderFee2.setOrderNo(10086l);
        orderFee2.setFeeCode("CT02");
        orderFee2.setIsDelete(0);
        orderFee2.setInFee(new BigDecimal("0"));
        orderFee2.setOutFee(new BigDecimal("0"));
        feeList.add(orderFee1);
        feeList.add(orderFee2);
        orderVo.setOrder(order);
        orderVo.setOrderAddress(orderAddress);
        orderVo.setOrderFeeList(feeList);
        System.out.println(JSON.toJSONString(orderVo));

    }
}
